<?php 
HeaderScripts::addJsLibrary(array(
	'jquery/jquery.lightbox.js',
	'jquery/jquery.qtip.js',
));
HeaderScripts::addScripts(array(
	'site/lightbox.js',
	'site/prices.js',
));
HeaderScripts::addStyles(array(
	'site/lightbox.css'
));
?>
<input type="hidden" name="hotelId" id="hotelId" value="<?php echo $hotel->id ?>">
<input type="hidden" name="columnsCount" id="columnsCount" value="<?php echo count($priceColumns) ?>">
<input type="hidden" name="nameFieldWidth" id="nameFieldWidth" value="<?php echo $gridConfig['nameFieldWidth'] ?>">
<input type="hidden" name="pricesFieldWidth" id="pricesFieldWidth" value="<?php echo $gridConfig['pricesFieldWidth'] ?>">

<div class="headerBlock">
	<div class="headerTxt">Гостиницы</div>
	<div class="hodelMakeOrder">[&nbsp;<a id="roomsAndPrices" style="cursor: pointer;">Номера и цены</a>&nbsp;]&nbsp;[&nbsp;<a href="/hotel/order/id/<?php echo $hotel->id ?>">Заказать</a>&nbsp;]</div>
	<div class="clear"></div>
</div>
<div class="detailedBlock">
	<div class="detailedBlockHeader"><?php echo htmlspecialchars($hotel->title) ?></div>
	<div class="detailedBlockPart">
		<strong>Количество звезд:</strong>&nbsp;<?php echo (intval($hotel->stars) > 0 ? str_repeat('<img src="/public/css/images/star.png" hspace="1">', $hotel->stars) : 'не задано') ?><br />
		<strong>Город:</strong>&nbsp;<?php echo htmlspecialchars($hotel->getRelated('city')->title) ?><br />
		<?php if ($hotel->address != '') { ?><strong>Адрес:</strong>&nbsp;<?php echo htmlspecialchars($hotel->address) ?><br /><?php } ?>
	</div>
	<?php if ($hotel->description != '') {?>
	<div class="detailedBlockPart">
		<div class="detailedBlockSubheader">Описание отеля:</div>
		<?php echo nl2br(htmlspecialchars($hotel->description)) ?>
	</div>
	<?php } ?>
	<?php if ($hotel->rooms != '') {?>
	<div class="detailedBlockPart">
		<div class="detailedBlockSubheader">Описание номеров:</div>
		<?php echo nl2br(htmlspecialchars($hotel->rooms)) ?>
	</div>
	<?php } ?>
	<?php if ($hotel->transfer != '') {?>
	<div class="detailedBlockPart">
		<div class="detailedBlockSubheader">Трансфер:</div>
		<?php echo nl2br(htmlspecialchars($hotel->transfer)) ?>
	</div>
	<?php } ?>
	<?php if (count($hotelFeatures) > 0) { ?>
	<div class="detailedBlockPart">
		<div class="detailedBlockSubheader">Услуги отеля:</div>
		<ul type="circle"><?php foreach($hotelFeatures as $feature) {?><li><?php echo htmlspecialchars($feature->getRelated('feature')->title) ?></li><?php } ?></ul>
	</div>
	<?php } ?>
	<?php if (count($roomFeatures) > 0) { ?>
	<div class="detailedBlockPart">
		<div class="detailedBlockSubheader">Услуги в номере:</div>
		<ul type="circle"><?php foreach($roomFeatures as $feature) {?><li><?php echo htmlspecialchars($feature->getRelated('feature')->title) ?></li><?php } ?></ul>
	</div>
	<?php } ?>
	<?php if (count($excursions) > 0) { ?>
	<div class="detailedBlockPart">
		<div class="detailedBlockSubheader">Экскурсии:</div>
		<ul type="circle"><?php foreach($excursions as $exc) {?><li><a href="/excursion/detailed/id/<?php echo $exc->getRelated('excursionData')->id ?>"><?php echo htmlspecialchars($exc->getRelated('excursionData')->title) ?></a></li><?php } ?></ul>
	</div>
	<?php } ?>
	
	<?php if (count($hotelPhotos) > 0) { ?>
	<div class="lightbox">
		<table>
			<tr>
		<?php foreach($hotelPhotos as $photo) {?>
			<td class="tdLightbox"><?php echo SiteLayout::showLightBoxPhoto($photo->image, 'hotel', htmlspecialchars($hotel->title)) ?></td>
		<?php } ?>
			</tr>
		</table>
	</div>
	<?php } ?>
</div>